<!DOCTYPE html>

<html>



    <head>



        <meta charset="utf-8">

        <meta http-equiv="X-UA-Compatible" content="IE=edge">

        <meta name="viewport" content="width=device-width, initial-scale=1">

        <title>验证手机号码</title>



        <!-- CSS -->

        <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:400,100,300,500">

        <link rel="stylesheet" href="__PUBLIC__/VerifyPhone/css/bootstrap.min.css">
        
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/bootstrap/css/font-awesome.min.css">


		<link rel="stylesheet" href="__PUBLIC__/VerifyPhone/css/form-elements.css">

        <link rel="stylesheet" href="__PUBLIC__/VerifyPhone/css/style.css">



        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->

        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->

        <!--[if lt IE 9]>

            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>

            <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>

        <![endif]-->



        <!-- Favicon and touch icons -->

    



    </head>



    <body style="background:#B2DDD3;">



        <!-- Top content -->

        <div class="top-content">

        	

            <div class="inner-bg">

                <div class="container">


                    <div class="row">

                        <div class="col-sm-6 col-sm-offset-3 form-box">

                        	<div class="form-top">

                        		<div class="form-top-left">

                        			<h3>验证手机号码</h3>

                            		<p>请输入手机号码获取验证码！</p>

                        		</div>

                        		<div class="form-top-right">

                        			<i class="fa fa-key"></i>

                        		</div>

                            </div>

                            <div class="form-bottom">

			                    <form id="verifyform" action="" onSubmit="return formsubmit();" class="login-form">
<!--<div class="form-group">

			                    		<label class="sr-only" for="form-username">手机号码：</label>

			                        	<input type="text" name="tel" placeholder="推荐人手机号码" class="form-username form-control" id="form-tel">

			                        </div>-->
                                    
                                    
                                    
                                    
			                    	<div class="form-group">

			                    		<label class="sr-only" for="form-username">手机号码：</label>

			                        	<input type="text" name="tel" placeholder="本人手机号码" class="form-username form-control" id="form-tel">

			                        </div>

			                        <div class="form-group">



<div class="row">
    <div class="col-xs-6"><label class="sr-only" for="form-password">请输入验证码</label>

			                        	<input type="text" name="verify" placeholder="请输入验证码" class="form-password form-control" id="form-password">
                                        </div><div class="col-xs-6">
                                        <button id="sendsms" type="button" class="btn btn-info" style="font-size:12px;">免费获取验证码</button></div>
</div>


			                        	
                                        
                                        
                                        
                                        

			                        </div>

			                        <button type="submit" class="btn">立即验证</button>
 
			                    </form>

		                    </div>

                        </div>

                    </div>

                    <!--<div class="row">

                        <div class="col-sm-6 col-sm-offset-3 social-login">

                        	<h3>...or login with:</h3>

                        	<div class="social-login-buttons">

	                        	<a class="btn btn-link-1 btn-link-1-facebook" href="#">

	                        		<i class="fa fa-facebook"></i> Facebook

	                        	</a>

	                        	<a class="btn btn-link-1 btn-link-1-twitter" href="#">

	                        		<i class="fa fa-twitter"></i> Twitter

	                        	</a>

	                        	<a class="btn btn-link-1 btn-link-1-google-plus" href="#">

	                        		<i class="fa fa-google-plus"></i> Google Plus

	                        	</a>

                        	</div>

                        </div>

                    </div>-->

                </div>

            </div>

            

        </div>





        <!-- Javascript -->

        <script src="__PUBLIC__/VerifyPhone/js/jquery-1.11.1.min.js"></script>

        <script src="__PUBLIC__/VerifyPhone/js/bootstrap.min.js"></script>




<script>


var countdown = {$timeout}*60; 
function settime(val) {
if (countdown == 0) {
val.removeAttribute("disabled");    
val.innerHTML="免费获取验证码"; 
countdown = {$timeout}*60; 
} else { 
val.setAttribute("disabled", true); 
val.innerHTML="重新发送(" + countdown + ")"; 
countdown--; 
} 
setTimeout(function() { 
settime(val) 
},1000) 
} 


function formsubmit(){
	$.ajax({
		url : '{:U('')}',
		data:$('#verifyform').serialize(),
		dataType:"json",
		type:'POST',
		success: function(data){
			if(data.status == 1){
				alert('验证成功');
				window.location.href = '{:U('Member/Index/index')}';
			}else{
				alert(data.info);
			}
		}
	});
	return false;
}



$('#sendsms').click(function(e) {
	
    $.post('{:U('VerifyPhoneSend')}', {tel:$('#form-tel').val()}, function(d){
		alert(d.info);
		if(d.status == 1){
			settime(document.getElementById('sendsms'));
		}
		
	},'json');
});

</script>
        

        <!--[if lt IE 10]>

            <script src="__PUBLIC__/VerifyPhone/assets/js/placeholder.js"></script>

        <![endif]-->



    </body>



</html>